package pl.edu.pk.mech.kkbus.model;

import static pl.edu.pk.mech.kkbus.staticstrings.ExchangePointsProperty.*;

import java.io.Serializable;

import com.google.appengine.api.datastore.Entity;

public class ExchangePoints extends Pojo implements Serializable{
	private static final long serialVersionUID = 5594226048139258876L;

	private String hash;
	private long idAward;
	private long idUser;
	
	public ExchangePoints(){}
	
	public ExchangePoints(Entity entity){
		this.id = entity.getKey().getId();
		this.hash = (String) entity.getProperty(EXCHANGE_POINTS_HASH);
		this.idAward = Long.valueOf(entity.getProperty(EXCHANGE_POINTS_ID_AWARD).toString());
		this.idUser = Long.valueOf(entity.getProperty(EXCHANGE_POINTS_ID_USER).toString());
	}
	
	public String getHash() {
		return hash;
	}
	public void setHash(String hash) {
		this.hash = hash;
	}

	public long getIdAward() {
		return idAward;
	}

	public void setIdAward(long idAward) {
		this.idAward = idAward;
	}

	public long getIdUser() {
		return idUser;
	}

	public void setIdUser(long idUser) {
		this.idUser = idUser;
	}
}
